Skip to content

Conversation

@cijothomas
Copy link
Member

MinMax is not supported currently, so not exposing any setting for that publicly. But this introduces a base class HistogramConfiguration to hold RecordMinMax as it'll be applied to ExplicitBucketHistogram and ExponentialHistogram(when that feature is added). Alternate would be to add RecordMinMax to both ExplicitBucketHistogram and ExponentialHistogram

@cijothomas cijothomas requested a review from a team November 29, 2021 22:14
@codecov
Copy link

codecov bot commented Nov 29, 2021

Codecov Report

Merging #2705 (bb83142) into main (5f5238d) will increase coverage by 0.02%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2705      +/-   ##
==========================================
+ Coverage   82.93%   82.96%   +0.02%     
==========================================
  Files         249      250       +1     
  Lines        8704     8705       +1     
==========================================
+ Hits         7219     7222       +3     
+ Misses       1485     1483       -2     
Impacted Files Coverage Δ
...ry/Metrics/ExplicitBucketHistogramConfiguration.cs 100.00% <ø> (ø)
src/OpenTelemetry/Metrics/MetricPoint.cs 85.00% <0.00%> (ø)
...tryProtocol/Implementation/MetricItemExtensions.cs 90.64% <100.00%> (ø)
...ometheus/Implementation/PrometheusSerializerExt.cs 100.00% <100.00%> (ø)
...rc/OpenTelemetry/Metrics/HistogramConfiguration.cs 100.00% <100.00%> (ø)
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 100.00% <0.00%> (+2.85%) ⬆️
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 82.35% <0.00%> (+2.94%) ⬆️

@cijothomas cijothomas merged commit 0c2552e into open-telemetry:main Nov 29, 2021

namespace OpenTelemetry.Metrics
{
public class HistogramConfiguration : MetricStreamConfiguration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to make this an abstract class?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need things like below in the future.
.AddView(instrumentName: "MyHistogram", new HistogramConfiguration() { Name = "newname", RecordMinMax = false })

@cijothomas cijothomas deleted the cijothomas/histogramminmax branch November 29, 2021 22:45
@cijothomas
Copy link
Member Author

cijothomas commented Nov 29, 2021

@utpilla is checking if this can be added after 1.2.0 as well, if yes, will revert to avoid the confusion when one uses this:

AddView(instrumentName: "MyCounter", new HistogramConfiguration() { Name = "newname"})  // user may assume this instruments aggregated as Histogram, but we dont support it.

This can be added after 1.2.0 as well. I have created the PR #2706 to revert the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants